import axios from "axios"

//分页获取题目列表
export const questionListByPageService = (data) => {
    return axios.get("/question/list", { params: { ...data } })
}

//获取所有考题类型
export const questionTypeListService = () => {
    return axios.get("/question/listQuestionType")
}

//通过id获取考题
export const questionGetByIdService = (id) => {
    return axios.get("/question/getById", { params: { id: id } })
}

//修改考题
export const questionEditService = (data) => {
    return axios.post("/question/edit", data)
}

//新增考题
export const questionInsertService = (data) => {
    return axios.post("/question/insert", data)
}

//根据id删除考题
export const questionDeleteByIdService = (id) => {
    return axios.delete("/question/deleteById", { params: { id: id } })
}

//获取所有考题
export const questionListAllService = () => {
    return axios.get("/question/listAll")
}